/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vista.admin.listeners;

import modelo.dominio.PlanGeneral;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import vista.admin.InternalFrame_AdminSist;

/**
 *
 * @author Felipe
 */
public class PlanGeneral_ActionListener implements ActionListener{

    public static final int INSERT = 0;
    public static final int SELECT = 1;
    public static final int UPDATE = 2;
    public static final int DELETE = 3;

    public int accion;

    private PlanGeneral planGral;
    //TODO implementar esto en Usuario_ActionListener
    public PlanGeneral_ActionListener(PlanGeneral plan, int acc){
        this.planGral = plan;
        this.accion = acc;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        JOptionPane.showMessageDialog(null, this.accion+" "+this.planGral.getClass().getSimpleName());
        /*Planes_TableModel modelo = (Planes_TableModel)tabla.getModel();
        PlanGeneral plangral = new PlanGeneral();
        plangral.setId(modelo.getRowCount()+1);
        plangral.setTitulo("Titulo");
        List<PlanGeneral> lista = modelo.getDatos();
        lista.add(plangral);
        modelo.setData(lista);*/
    }

}
